<!DOCTYPE html>












  


<html class="theme-next muse use-motion" lang="zh-CN">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">


  
  
  <link rel="stylesheet" href="/lib/needsharebutton/needsharebutton.css">



  
  
    
    
  <script src="/lib/pace/pace.min.js?v=1.0.2"></script>
  <link rel="stylesheet" href="/lib/pace/pace-theme-minimal.min.css?v=1.0.2">















  
  
  <link rel="stylesheet" href="/lib/fancybox/source/jquery.fancybox.css">




  
  
  
  

  
    
    
  

  
    
      
    

    
  

  
    
      
    

    
  

  
    
      
    

    
  

  
    
      
    

    
  

  

  
    
    
    <link rel="stylesheet" href="//fonts.loli.net/css?family=Roboto Slab:300,300italic,400,400italic,700,700italic|Roboto Slab:300,300italic,400,400italic,700,700italic|Roboto Slab:300,300italic,400,400italic,700,700italic|Lobster Two:300,300italic,400,400italic,700,700italic|Fira Code:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext">
  






<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2">

<link rel="stylesheet" href="/css/main.css?v=7.1.1">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=7.1.1">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=7.1.1">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=7.1.1">


  <link rel="mask-icon" href="/images/logo.svg?v=7.1.1" color="#222">







<script id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    version: '7.1.1',
    sidebar: {"position":"left","display":"hide","offset":12,"onmobile":true,"dimmer":false},
    back2top: true,
    back2top_sidebar: false,
    fancybox: true,
    fastclick: false,
    lazyload: true,
    tabs: true,
    motion: {"enable":true,"async":true,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="软件推荐工欲善其事，必先利其器。              编写markdown推荐使用vsc（安装markdown preview enhanced更佳）或者Typora软件，当然有道云笔记也不错哦~（当前文章就是从有道云复制共享出来）目前osc、简书、csdn等都支持markdown。markdown的语法简洁，文档备份方便，是写博客的首选。             缺点 表格和插图，图片存储">
<meta name="keywords" content="hexo,markdown">
<meta property="og:type" content="article">
<meta property="og:title" content="markdown示例">
<meta property="og:url" content="http://lizhuangs.github.io/2019/05/11/markdown示例/index.html">
<meta property="og:site_name" content="tudou&#39;s Blog">
<meta property="og:description" content="软件推荐工欲善其事，必先利其器。              编写markdown推荐使用vsc（安装markdown preview enhanced更佳）或者Typora软件，当然有道云笔记也不错哦~（当前文章就是从有道云复制共享出来）目前osc、简书、csdn等都支持markdown。markdown的语法简洁，文档备份方便，是写博客的首选。             缺点 表格和插图，图片存储">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="https://note.youdao.com/favicon.ico">
<meta property="og:updated_time" content="2019-05-19T13:36:41.682Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="markdown示例">
<meta name="twitter:description" content="软件推荐工欲善其事，必先利其器。              编写markdown推荐使用vsc（安装markdown preview enhanced更佳）或者Typora软件，当然有道云笔记也不错哦~（当前文章就是从有道云复制共享出来）目前osc、简书、csdn等都支持markdown。markdown的语法简洁，文档备份方便，是写博客的首选。             缺点 表格和插图，图片存储">
<meta name="twitter:image" content="https://note.youdao.com/favicon.ico">



  <link rel="alternate" href="/atom.xml" title="tudou's Blog" type="application/atom+xml">



  
  
  <link rel="canonical" href="http://lizhuangs.github.io/2019/05/11/markdown示例/">



<script id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>markdown示例 | tudou's Blog</title>
  












  <noscript>
  <style>
  .use-motion .motion-element,
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-title { opacity: initial; }

  .use-motion .logo,
  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="site-title">tudou's Blog</span>
      </a>
    </div>
    
      
        <p class="site-subtitle">生命的荣枯、全视你怎么去栽培</p>
      
    
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">

    
    
    
      
    

    

    <a href="/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i> <br>首页</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">

    
    
    
      
    

    

    <a href="/tags/" rel="section"><i class="menu-item-icon fa fa-fw fa-tags"></i> <br>标签</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">

    
    
    
      
    

    

    <a href="/categories/" rel="section"><i class="menu-item-icon fa fa-fw fa-th"></i> <br>分类</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">

    
    
    
      
    

    

    <a href="/archives/" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i> <br>归档</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-时光">

    
    
    
      
    

    

    <a href="/photos/" rel="section"><i class="menu-item-icon fa fa-fw fa-camera-retro"></i> <br>时光</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-about">

    
    
    
      
    

    

    <a href="/about/" rel="section"><i class="menu-item-icon fa fa-fw fa-user"></i> <br>关于</a>

  </li>

      
      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br>搜索</a>
        </li>
      
    </ul>
  

  
    

  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off" placeholder="搜索..." spellcheck="false" type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



  







</div>
    </header>

    
  
  

  

  <a href="https://github.com/lizhuangs" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewbox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a>



    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://lizhuangs.github.io/2019/05/11/markdown示例/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="很拽の土豆">
      <meta itemprop="description" content="昨夜星辰昨夜风 画楼西畔桂堂东">
      <meta itemprop="image" content="/images/logo.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="tudou's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">markdown示例

              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2019-05-11 22:55:41" itemprop="dateCreated datePublished" datetime="2019-05-11T22:55:41+08:00">2019-05-11</time>
            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span>

                
                
                  ，
                
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/markdown/" itemprop="url" rel="index"><span itemprop="name">markdown</span></a></span>

                
                
              
            </span>
          

          
            
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="post-meta-item-icon">
            <i class="fa fa-eye"></i>
             阅读次数： 
            <span class="busuanzi-value" id="busuanzi_value_page_pv"></span>
            </span>
          

          
            <div class="post-symbolscount">
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">本文字数：</span>
                
                <span title="本文字数">5.1k</span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">5 分钟</span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="软件推荐"><a href="#软件推荐" class="headerlink" title="软件推荐"></a>软件推荐</h2><p>工欲善其事，必先利其器。</p>
<div class="note info">
            <p>编写markdown推荐使用vsc（安装markdown preview enhanced更佳）或者Typora软件，当然有道云笔记也不错哦~（当前文章就是从有道云复制共享出来）</p><p>目前osc、简书、csdn等都支持markdown。markdown的语法简洁，文档备份方便，是写博客的首选。</p>
          </div>

<p><strong>缺点</strong> 表格和插图，图片存储位置在很多软件上面不统一，尤其是在线编辑器，markdown代码很容易复制过去，嗯，除非图片都保存在一个统一的云端(<code>PicGo</code>图床上传工具你值得拥有)。</p>
<a id="more"></a>
<hr>
<p>目录示例</p>
<p>[TOC]</p>
<p>目录使用[TOC]就可以生成带有层级的目录了，但是它貌似不是标准的markdown写法，很遗憾hexo和github就不支持。</p>
<ul>
<li>github生成目录，可以使用vsc的markdown preview enhanced插件</li>
<li>hexo侧边自带文章目录，所以就不折腾了，不信你瞧一眼</li>
</ul>
<hr>
<h2 id="标题示例"><a href="#标题示例" class="headerlink" title="标题示例"></a>标题示例</h2><h3 id="三级标题"><a href="#三级标题" class="headerlink" title="三级标题 \"></a>三级标题 \</h3><h4 id="四级标题"><a href="#四级标题" class="headerlink" title="四级标题 \"></a>四级标题 \</h4><p>总共6级标题 ，一个#表示1级，注意上面的TOC目录是根据标题等级生成层级关系的</p>
<h1 id="一级标题"><a href="#一级标题" class="headerlink" title="一级标题 ===="></a>一级标题 ====</h1><h2 id="二级标题-—"><a href="#二级标题-—" class="headerlink" title="二级标题 —-"></a>二级标题 —-</h2><p>这种写法的一二级标题等同于上面的一二级标题，但是很多解析器toc目录会忽略，基本不用</p>
<hr>
<h2 id="字体效果"><a href="#字体效果" class="headerlink" title="字体效果"></a>字体效果</h2><p><em>斜体</em> ：*斜体*或_斜体_</p>
<p><strong>加粗</strong> ：**加粗**</p>
<p><strong><em>加粗</em></strong> ：***斜体加粗***</p>
<p><del>删除线</del> ：~~删除线~~</p>
<p><u>下划线</u> ：&lt;u&gt;下划线&lt;/u&gt;</p>
<p>高亮字体：==高亮字体==</p>
<p><font face="微软雅黑">我是微软雅黑字</font></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;font face=&quot;微软雅黑&quot;&gt;我是微软雅黑字&lt;/font&gt;</span><br></pre></td></tr></table></figure>

<p><font color="#A52A2A" size="4">字体加大变色</font></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;font color=#A52A2A size=4 &gt;字体加大变色&lt;/font&gt;</span><br></pre></td></tr></table></figure>

<hr>
<h2 id="列表"><a href="#列表" class="headerlink" title="列表"></a>列表</h2><p>==<strong>列表结尾最好有空行。多个列表连续时中间空2行。</strong>==</p>
<h3 id="无序列表（-开头后面加空格）"><a href="#无序列表（-开头后面加空格）" class="headerlink" title="无序列表（*+-开头后面加空格）"></a>无序列表（*+-开头后面加空格）</h3><ul>
<li>星号开头</li>
</ul>
<ul>
<li>加号开头</li>
</ul>
<ul>
<li>减号开头</li>
</ul>
<h3 id="有序列表（数字-英文句号-空格）"><a href="#有序列表（数字-英文句号-空格）" class="headerlink" title="有序列表（数字+英文句号+空格）"></a>有序列表（数字+英文句号+空格）</h3><p>我数字后没有跟空格，看起来像其实不是有序列表<br>1.有序列表<br>2.有序列表<br>3.有序列表</p>
<p>我是有序列表，在有些编辑器列表会和上面的列表数字连起来。<br>出现这种问题，可以将此行前面加一个空格缩进。</p>
<ol>
<li>有序列表</li>
<li>有序列表</li>
<li>有序列表</li>
</ol>
<h3 id="无序嵌套无序，二级前面2个空格"><a href="#无序嵌套无序，二级前面2个空格" class="headerlink" title="无序嵌套无序，二级前面2个空格"></a>无序嵌套无序，二级前面2个空格</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">- 一级</span><br><span class="line">  - 二级</span><br><span class="line">- 一级</span><br><span class="line">  - 二级</span><br></pre></td></tr></table></figure>

<p>效果如下：</p>
<ul>
<li>一级<ul>
<li>二级</li>
</ul>
</li>
<li>一级<ul>
<li>二级</li>
</ul>
</li>
</ul>
<h3 id="有序嵌套无序，二级前面4个空格"><a href="#有序嵌套无序，二级前面4个空格" class="headerlink" title="有序嵌套无序，二级前面4个空格"></a>有序嵌套无序，二级前面4个空格</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">1. 第一项：</span><br><span class="line">    - 第一项嵌套的第一个元素</span><br><span class="line">    - 第一项嵌套的第二个元素</span><br><span class="line">2. 第二项：</span><br><span class="line">    - 第二项嵌套的第一个元素</span><br><span class="line">    - 第二项嵌套的第一个元素</span><br></pre></td></tr></table></figure>

<p>效果如下：</p>
<ol>
<li>第一项：<ul>
<li>第一项嵌套的第一个元素</li>
<li>第一项嵌套的第二个元素</li>
</ul>
</li>
<li>第二项：<ul>
<li>第二项嵌套的第一个元素</li>
<li>第二项嵌套的第一个元素</li>
</ul>
</li>
</ol>
<h3 id="无序-无序-有序实现三级列表"><a href="#无序-无序-有序实现三级列表" class="headerlink" title="无序++无序+有序实现三级列表"></a>无序++无序+有序实现三级列表</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">+ 一级1</span><br><span class="line">  - 二级1.1</span><br><span class="line">  - 二级1.2</span><br><span class="line">    1. 三级1.2.1</span><br><span class="line">    2. 三级1.2.2</span><br><span class="line">  - 二级1.3</span><br><span class="line">+ 一级2</span><br></pre></td></tr></table></figure>

<p>效果如下：</p>
<ul>
<li>一级1<ul>
<li>二级1.1</li>
<li>二级1.2<ol>
<li>三级1.2.1</li>
<li>三级1.2.2</li>
</ol>
</li>
<li>二级1.3</li>
</ul>
</li>
<li>一级2</li>
</ul>
<hr>
<h2 id="换行"><a href="#换行" class="headerlink" title="换行"></a>换行</h2><p>方法1: 连续两个以上空格+回车<br>方法2：使用html语言&lt;br/&gt;</p>
<hr>
<h2 id="水平线"><a href="#水平线" class="headerlink" title="水平线"></a>水平线</h2><p>3个连续*或-或_</p>
<p><strong>注意：超过3个-是二级标题，不过有时候不生效</strong></p>
<hr>
<h2 id="背景色"><a href="#背景色" class="headerlink" title="背景色"></a>背景色</h2><p>Markdown本身不支持背景色设置，借助 table, tr, td 等表格标签的 bgcolor 属性来实现背景色的功能(简书，有道云笔记本等不支持)。举例如下：</p>
<table><tr><td bgcolor="green">背景色是：green</td></tr></table>

<p>注意：html代码块后面要换行，否则在vscode中会有问题。</p>
<hr>
<h2 id="代码块"><a href="#代码块" class="headerlink" title="代码块"></a>代码块</h2><h3 id="行内代码块"><a href="#行内代码块" class="headerlink" title="行内代码块"></a>行内代码块</h3><p>代码块（和引用效果很像）：</p>
<pre><code>一个tab或4个英文空格就是代码块，但是前面要空一行。我是引用。</code></pre><p>行内代码块，用`括起来：<br>示例：<br>`代码块`<br>结果：<br><code>代码块</code></p>
<h3 id="块状代码块"><a href="#块状代码块" class="headerlink" title="块状代码块"></a>块状代码块</h3><p>块状代码块用以3个`符号开始和结束的，并且开始和结束单独一行</p>
<p>示例<br>&lt;!–￼5–&gt;</p>
<p>效果：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">&lt;xml&gt;我是代码块&lt;/xml&gt;</span><br><span class="line">&lt;xml&gt;我是代码块&lt;/xml&gt;</span><br></pre></td></tr></table></figure>

<hr>
<h3 id="高亮代码块"><a href="#高亮代码块" class="headerlink" title="高亮代码块"></a>高亮代码块</h3><p>高亮代码块是在开始的3个`后添加具体的语言</p>
<p>&lt;!–￼7–&gt;</p>
<p>效果：</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">xml</span>&gt;</span>高亮代码块<span class="tag">&lt;/<span class="name">xml</span>&gt;</span></span><br></pre></td></tr></table></figure>

<hr>
<h2 id="引用"><a href="#引用" class="headerlink" title="引用"></a>引用</h2><h3 id="普通引用"><a href="#普通引用" class="headerlink" title="普通引用"></a>普通引用</h3><p>引用就是在段落前面添加&gt;<br>示例<br>&gt;引用<br>&gt;引用<br>结果</p>
<blockquote>
<p>引用<br>引用</p>
</blockquote>
<h3 id="嵌套引用"><a href="#嵌套引用" class="headerlink" title="嵌套引用"></a>嵌套引用</h3><p>当前层数递增，则层层断开嵌套<br>当前层小于等于上一层，则两层平级  </p>
<p>&gt;1层<br>&gt;&gt;2层<br>&gt;&gt;&gt;3层<br>&gt;当前层小于等于上一层，则平级<br>&gt;&gt;2个&gt;<br>&gt;&gt;&gt;3个&gt;当前层大于上一层<br>&gt;&gt;&gt;&gt;4个&gt;<br>&gt;1个&gt;当前层小于等于上一层<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;7个&gt;断层，因为当前层大于上一层<br>效果:  </p>
<blockquote>
<p>1层</p>
<blockquote>
<p>2层</p>
<blockquote>
<p>3层<br>当前层小于等于上一层，则平级<br>2个&gt;<br>3个&gt;当前层大于上一层</p>
<blockquote>
<p>4个&gt;<br>1个当前层小于等于上一层</p>
<blockquote>
<blockquote>
<blockquote>
<p>7个&gt;断层，因为当前层大于上一层<br>注意，层的最后一行要空行，不然你会看到这句话也在层里面。同样的问题也出现在列表上。</p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<p>经验：在使用引用和列表的时候，结尾最好空2行为好。</p>
<hr>
<h2 id="待办事项"><a href="#待办事项" class="headerlink" title="待办事项"></a>待办事项</h2><p>- [x] 已完成  </p>
<p>- [ ] 未完成  </p>
<p>效果：  </p>
<ul>
<li><input checked disabled type="checkbox"> 已完成</li>
<li><input disabled type="checkbox"> 未完成<ul>
<li><input checked disabled type="checkbox"> 日志研究</li>
<li><input disabled type="checkbox"> 路由</li>
<li><input disabled type="checkbox"> Rxjs<br>待办事项后面要换行，否则下面一行的文字会变成待办事项。比如这一行。</li>
</ul>
</li>
</ul>
<p>hexo不支持todolist，需要安装插件，目前插件和目录有冲突</p>
<hr>
<h2 id="图片插入"><a href="#图片插入" class="headerlink" title="图片插入"></a>图片插入</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">![图片示例](https://note.youdao.com/favicon.ico)</span><br></pre></td></tr></table></figure>

<p>效果<br><img src="https://note.youdao.com/favicon.ico" alt="图片示例"></p>
<p>在 markdown 直接使用提供的语法引入图片是无法设置大小的，所以我们需要用到 html 的 img 标签。<br><code>&lt;img width=&quot;  &quot; alt=&quot;描述&quot; src=&quot;url&quot;/&gt;</code><br>在 markdown 设置图片居中是需要通过 div 来控制的。<br><code>&lt;div align=center&gt;&lt;img width=&quot;267px&quot; alt=&quot;&quot; src=&quot;xx&quot;/&gt;&lt;/div&gt;</code></p>
<hr>
<h2 id="表格"><a href="#表格" class="headerlink" title="表格"></a>表格</h2><p>| 列1 | 列3 | 列3 |  </p>
<p>| :— | :–: | —: |  </p>
<p>| 左对齐 | 居中对齐 | 右对齐 |  </p>
<table>
<thead>
<tr>
<th align="left">列1</th>
<th align="center">列3</th>
<th align="right">列3</th>
</tr>
</thead>
<tbody><tr>
<td align="left">左对齐</td>
<td align="center">居中对齐</td>
<td align="right">右对齐</td>
</tr>
<tr>
<td align="left">第二行中的字符:在左面左对齐，在两边居中对齐，在右面右对齐，没有:默认左对齐。</td>
<td align="center"></td>
<td align="right"></td>
</tr>
</tbody></table>
<h3 id="表格在线转换"><a href="#表格在线转换" class="headerlink" title="表格在线转换"></a>表格在线转换</h3><p><a href="https://tableconvert.com/" target="_blank" rel="noopener">tableconvert</a></p>
<p>右上角导入html，点确定可以直接生成markdown</p>
<h2 id="链接"><a href="#链接" class="headerlink" title="链接"></a>链接</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[有道](https://note.youdao.com/ &quot;鼠标移上来的提示，可以省略&quot;)</span><br></pre></td></tr></table></figure>

<p>效果<br><a href="https://note.youdao.com/" title="鼠标移上来的提示，可以省略" target="_blank" rel="noopener">有道</a></p>
<h2 id="时序图"><a href="#时序图" class="headerlink" title="时序图"></a>时序图</h2><p>-&gt; 直线，–&gt;虚线，-&gt;&gt;实线箭头<br>各软件写法目前不统一。建议直接看源码吧。<br><a href="https://mermaidjs.github.io/" target="_blank" rel="noopener">markdown图</a><br><a href="https://jingyan.baidu.com/article/48b558e3035d9a7f38c09aeb.html" target="_blank" rel="noopener">示例地址</a></p>
<p>typora和vscode使用<a href="https://bramp.github.io/js-sequence-diagrams/" target="_blank" rel="noopener">js-sequence</a>实现，<a href="https://support.typora.io/Draw-Diagrams-With-Markdown/" target="_blank" rel="noopener">typora官方说明</a>：显示如下：</p>
<p>简单示例：</p>
<div id="sequence-0"></div>

<p>复杂示例</p>
<div id="sequence-1"></div>
以上代码在vscode可以切换主题：`sequence {theme='hand'}`

<p>有道云写法很特殊：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">sequenceDiagram</span><br><span class="line">客户端-&gt;&gt;用户中心: 获取token，login(uname,pwd)</span><br><span class="line">用户中心-&gt;&gt;客户端: 返回token</span><br><span class="line">客户端-&gt;&gt;SDK: 调带接口，携带token</span><br><span class="line">SDK-&gt;&gt;用户中心: 检验token</span><br><span class="line">用户中心-&gt;&gt;SDK: 返回token检验结果</span><br><span class="line">SDK-&gt;&gt;客户端: token成功或失败返回相应处理结果</span><br></pre></td></tr></table></figure>

<hr>
<h2 id="Emoji"><a href="#Emoji" class="headerlink" title="Emoji"></a>Emoji</h2><p><a href="http://emojihomepage.com/" target="_blank" rel="noopener">从这里直接点一下就复制了</a><br>或者使用:表情:，表情二字换成smile</p>
<p>😄:smile:</p>
<hr>
<h2 id="特殊符号处理"><a href="#特殊符号处理" class="headerlink" title="特殊符号处理"></a>特殊符号处理</h2><p>Markdown使用反斜杠\插入语法中用到的特殊符号。在Markdown中，主要有以下几种特殊符号需要处理：</p>
<p>\   反斜线<br>`   反引号</p>
<ul>
<li>星号<br>_   底线<br>{}  花括号<br>[]  方括号<br>()  括弧<h1 id="井字号"><a href="#井字号" class="headerlink" title="井字号"></a>井字号</h1></li>
</ul>
<ul>
<li>加号</li>
</ul>
<ul>
<li>减号<br>.   英文句点<br>!   惊叹号<br>例如，如果你需要插入反斜杠，就连续输入两个反斜杠即可：\ \ =&gt; \ 。</li>
</ul>
<p>注：在内容中输入以上特殊符号的时候一定要注意转义，否则将导致内容显示不全，甚至排版混乱。</p>
<hr>
<h2 id="hexo"><a href="#hexo" class="headerlink" title="hexo"></a>hexo</h2><div class="note danger">
            <p>在hexo中note和tabs标签需要开启才可以使用 </p>
          </div>

<h3 id="note"><a href="#note" class="headerlink" title="note"></a>note</h3><p>note为hexo的插件，普通markdown并不支持<br>格式为：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&#123;% note class_name %&#125;</span><br><span class="line">现在该说点什么呢</span><br><span class="line">&#123;% endnote %&#125;</span><br></pre></td></tr></table></figure>

<p>class_name有6个值：default，primary，success，info，warning，danger</p>
<p>效果如下</p>
<div class="note ">
            <p>现在该说点什么呢，我没有class_name </p>
          </div>
<div class="note default">
            <p>现在该说点什么呢 default </p>
          </div>
<div class="note primary">
            <p>现在该说点什么呢 primary </p>
          </div>
<div class="note success">
            <p>现在该说点什么呢 success </p>
          </div>
<div class="note info">
            <p>现在该说点什么呢 info </p>
          </div>
<div class="note warning">
            <p>现在该说点什么呢 warning </p>
          </div>
<div class="note danger">
            <p>现在该说点什么呢 danger </p>
          </div>

<h3 id="tabs"><a href="#tabs" class="headerlink" title="tabs"></a>tabs</h3><div class="tabs" id><ul class="nav-tabs"><li class="tab active"><a href="#-1"><i class="fa fa-heart"></i>first tab</a></li><li class="tab"><a href="#-2">second tab</a></li></ul><div class="tab-content"><div class="tab-pane active" id="-1"><p> first</p></div><div class="tab-pane" id="-2"><p> second</p></div></div></div>

<h3 id="文本居中的引用"><a href="#文本居中的引用" class="headerlink" title="文本居中的引用"></a>文本居中的引用</h3><p>源码</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&#123;% cq %&#125;</span><br><span class="line">很拽的土豆说：情不知所起、一往而深 </span><br><span class="line">&#123;% endcq %&#125;</span><br></pre></td></tr></table></figure>

<p>效果</p>
<blockquote class="blockquote-center"><p>很拽的土豆说：情不知所起、一往而深 </p>
</blockquote>

<p>使用font包起来，可以改变字体大小<br><font size="40"></font></p>
<blockquote class="blockquote-center"><p>很拽的土豆说：情不知所起、一往而深 </p>
</blockquote>


<hr>
<script src="https://cdn.bootcss.com/webfont/1.6.28/webfontloader.js"></script><script src="https://cdn.bootcss.com/raphael/2.2.8/raphael.min.js"></script><script src="https://cdn.bootcss.com/snap.svg/0.5.1/snap.svg-min.js"></script><script src="https://cdn.bootcss.com/underscore.js/1.9.1/underscore-min.js"></script><script src="https://cdn.bootcss.com/js-sequence-diagrams/1.0.6/sequence-diagram-min.js"></script><textarea id="sequence-0-code" style="display: none">Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!</textarea><textarea id="sequence-0-options" style="display: none">{"theme":"simple"}</textarea><script>  var code = document.getElementById("sequence-0-code").value;  var options = JSON.parse(decodeURIComponent(document.getElementById("sequence-0-options").value));  var diagram = Diagram.parse(code);  diagram.drawSVG("sequence-0", options);</script><textarea id="sequence-1-code" style="display: none">Note right of 客户端: 客户端的描述
Note left of 用户中心: 用户中心的描述
Note right of SDK: SDK的描述
客户端->用户中心: 获取token，login(uname,pwd)
用户中心-->>客户端: 返回token
客户端->SDK: 调带接口，携带token
SDK->用户中心: 检验token
用户中心-->>SDK: 返回token检验结果
SDK-->>客户端: token成功或失败返回相应处理结果</textarea><textarea id="sequence-1-options" style="display: none">{"theme":"simple"}</textarea><script>  var code = document.getElementById("sequence-1-code").value;  var options = JSON.parse(decodeURIComponent(document.getElementById("sequence-1-options").value));  var diagram = Diagram.parse(code);  diagram.drawSVG("sequence-1", options);</script>
      
    </div>

    
      


    

    <div>
          
              <div>
    
        <div style="text-align:center;color: green;font-size:14px;">
          <br><br>
              - - - - - - 本文结束 <i class="fa fa-paw"></i> 感谢您的阅读 - - - - - -
              <br>
        </div>
    
</div>

          
    </div>

    
    
    

    

    
      
    
    
      <div>
        <div id="reward-container">
  <div>觉得文章不错？请我喝杯奶茶吧~蓝莓味~</div>
  <button id="reward-button" disable="enable" onclick="var qr = document.getElementById(&quot;qr&quot;); qr.style.display = (qr.style.display === 'none') ? 'block' : 'none';">
    打赏
  </button>
  <div id="qr" style="display: none;">

    
      
      
        
      
      <div style="display: inline-block">
        <img src="/images/wechatpay.png" alt="很拽の土豆 微信支付">
        <p>微信支付</p>
      </div>
    
      
      
        
      
      <div style="display: inline-block">
        <img src="/images/alipay.png" alt="很拽の土豆 支付宝">
        <p>支付宝</p>
      </div>
    

  </div>
</div>

      </div>
    

    
      <div>
        




  



<ul class="post-copyright">
  <li class="post-copyright-author">
      <strong>本文标题:</strong>
      <a href="/2019/05/11/markdown示例/">markdown示例</a>
  </li>
  <li class="post-copyright-author">
    <strong>本文作者： </strong>很拽の土豆</li>
<li class="post-copyright-author">
    <strong>发布时间:</strong>
    2019年05月11日 - 22:05
  </li>
  <li class="post-copyright-author">
    <strong>最后更新:</strong>
    2019年05月19日 - 21:05
  </li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    
    <a href="http://lizhuangs.github.io/2019/05/11/markdown示例/" title="markdown示例">http://lizhuangs.github.io/2019/05/11/markdown示例/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/zh-CN" rel="noopener" target="_blank"><i class="fa fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！</li>
</ul>

      </div>
    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/hexo/" <i class="fa fa-tag"> hexo</a>
          
            <a href="/tags/markdown/" <i class="fa fa-tag"> markdown</a>
          
        </div>
      

      
      
        <div class="post-widgets">
        

        

        
          
          <div class="social_share">
            
            
              <div id="needsharebutton-postbottom">
                <span class="btn">
                  <i class="fa fa-share-alt" aria-hidden="true"></i>
                </span>
              </div>
            
            
          </div>
        
        </div>
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2019/05/08/hello-world/" rel="next" title="Hello World">
                <i class="fa fa-chevron-left"></i> Hello World
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2019/05/12/nfs安装/" rel="prev" title="nfs安装">
                nfs安装 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


  </div>
<style>
body{
  background-color: #fff;
}
</style>

          </div>
          

  

  
    <div class="comments" id="gitalk-container">
    </div>

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/images/logo.gif" alt="很拽の土豆">
            
              <p class="site-author-name" itemprop="name">很拽の土豆</p>
              <div class="site-description motion-element" itemprop="description">昨夜星辰昨夜风 画楼西畔桂堂东</div>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">7</span>
                    <span class="site-state-item-name">日志</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  
                    
                      <a href="/categories/">
                    
                  
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">12</span>
                    <span class="site-state-item-name">分类</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  
                    
                      <a href="/tags/">
                    
                  
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">14</span>
                    <span class="site-state-item-name">标签</span>
                  </a>
                </div>
              
            </nav>
          

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          

          
            <div class="links-of-author motion-element">
              
                <span class="links-of-author-item">
                  
                  
                    
                  
                  
                    
                  
                  <a href="https://github.com/lizhuangs" title="GitHub &rarr; https://github.com/lizhuangs" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i>GitHub</a>
                </span>
              
                <span class="links-of-author-item">
                  
                  
                    
                  
                  
                    
                  
                  <a href="https://gitee.com/lizhuang" title="Gitee &rarr; https://gitee.com/lizhuang" rel="noopener" target="_blank"><i class="fa fa-fw fa-user"></i>Gitee</a>
                </span>
              
                <span class="links-of-author-item">
                  
                  
                    
                  
                  
                    
                  
                  <a href="mailto:le.zh@qq.com" title="E-Mail &rarr; mailto:le.zh@qq.com" rel="noopener" target="_blank"><i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                </span>
              
                <span class="links-of-author-item">
                  
                  
                    
                  
                  
                    
                  
                  <a href="http://weibo.com/lizhuangs" title="Weibo &rarr; http://weibo.com/lizhuangs" rel="noopener" target="_blank"><i class="fa fa-fw fa-weibo"></i>Weibo</a>
                </span>
              
            </div>
          

          

          
          

          
            
          
          

        </div>
      </div>

      
      <!--noindex-->
        <div class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
            
            
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#软件推荐"><span class="nav-number">1.</span> <span class="nav-text">软件推荐</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#标题示例"><span class="nav-number">2.</span> <span class="nav-text">标题示例</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#三级标题"><span class="nav-number">2.1.</span> <span class="nav-text">三级标题 \</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#四级标题"><span class="nav-number">2.1.1.</span> <span class="nav-text">四级标题 \</span></a></li></ol></li></ol></li></ol><li class="nav-item nav-level-1"><a class="nav-link" href="#一级标题"><span class="nav-number"></span> <span class="nav-text">一级标题 ====</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#二级标题-—"><span class="nav-number">1.</span> <span class="nav-text">二级标题 —-</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#字体效果"><span class="nav-number">2.</span> <span class="nav-text">字体效果</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#列表"><span class="nav-number">3.</span> <span class="nav-text">列表</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#无序列表（-开头后面加空格）"><span class="nav-number">3.1.</span> <span class="nav-text">无序列表（*+-开头后面加空格）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#有序列表（数字-英文句号-空格）"><span class="nav-number">3.2.</span> <span class="nav-text">有序列表（数字+英文句号+空格）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#无序嵌套无序，二级前面2个空格"><span class="nav-number">3.3.</span> <span class="nav-text">无序嵌套无序，二级前面2个空格</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#有序嵌套无序，二级前面4个空格"><span class="nav-number">3.4.</span> <span class="nav-text">有序嵌套无序，二级前面4个空格</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#无序-无序-有序实现三级列表"><span class="nav-number">3.5.</span> <span class="nav-text">无序++无序+有序实现三级列表</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#换行"><span class="nav-number">4.</span> <span class="nav-text">换行</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#水平线"><span class="nav-number">5.</span> <span class="nav-text">水平线</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#背景色"><span class="nav-number">6.</span> <span class="nav-text">背景色</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#代码块"><span class="nav-number">7.</span> <span class="nav-text">代码块</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#行内代码块"><span class="nav-number">7.1.</span> <span class="nav-text">行内代码块</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#块状代码块"><span class="nav-number">7.2.</span> <span class="nav-text">块状代码块</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#高亮代码块"><span class="nav-number">7.3.</span> <span class="nav-text">高亮代码块</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#引用"><span class="nav-number">8.</span> <span class="nav-text">引用</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#普通引用"><span class="nav-number">8.1.</span> <span class="nav-text">普通引用</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#嵌套引用"><span class="nav-number">8.2.</span> <span class="nav-text">嵌套引用</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#待办事项"><span class="nav-number">9.</span> <span class="nav-text">待办事项</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#图片插入"><span class="nav-number">10.</span> <span class="nav-text">图片插入</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#表格"><span class="nav-number">11.</span> <span class="nav-text">表格</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#表格在线转换"><span class="nav-number">11.1.</span> <span class="nav-text">表格在线转换</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#链接"><span class="nav-number">12.</span> <span class="nav-text">链接</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#时序图"><span class="nav-number">13.</span> <span class="nav-text">时序图</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Emoji"><span class="nav-number">14.</span> <span class="nav-text">Emoji</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#特殊符号处理"><span class="nav-number">15.</span> <span class="nav-text">特殊符号处理</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#井字号"><span class="nav-number"></span> <span class="nav-text">井字号</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#hexo"><span class="nav-number">1.</span> <span class="nav-text">hexo</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#note"><span class="nav-number">1.1.</span> <span class="nav-text">note</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#tabs"><span class="nav-number">1.2.</span> <span class="nav-text">tabs</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#文本居中的引用"><span class="nav-number">1.3.</span> <span class="nav-text">文本居中的引用</span></a></li></ol></li></ol></li></div>
            

          </div>
        </div>
      <!--/noindex-->
      

      

    </div>
  </aside>
  


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love" id="animate">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">很拽の土豆</span>

  
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    
    <span title="站点总字数">19k</span>
  

  
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    
    <span title="站点阅读时长">18 分钟</span>
  
</div>









        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
  本站已有
  <span class="site-uv" title="总访客量">
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
    </span>
    位访客
    <span class="post-meta-item-icon">
      <i class="fa fa-user"></i>
    </span>
  

  
    <span class="post-meta-divider">|</span>
  

  
  <span class="site-pv" title="总访问量">
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
    </span>
  人阅读
    <span class="post-meta-item-icon">
      <i class="fa fa-eye"></i>
    </span>
  
</div>









        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
          <span id="scrollpercent"><span>0</span>%</span>
        
      </div>
    

    

    

    
  </div>

  

<script>
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>







  






  















  
  <script src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script src="/lib/fancybox/source/jquery.fancybox.pack.js"></script>


  


  <script src="/js/utils.js?v=7.1.1"></script>

  <script src="/js/motion.js?v=7.1.1"></script>










  
  


  <script src="/js/schemes/muse.js?v=7.1.1"></script>



  
  <script src="/js/scrollspy.js?v=7.1.1"></script>
<script src="/js/post-details.js?v=7.1.1"></script>



  


  <script src="/js/next-boot.js?v=7.1.1"></script>


  

  

  

  


  
    

  

<script src="//cdn.bootcss.com/gitalk/1.5.0/gitalk.min.js"></script>



  

<link rel="stylesheet" href="//cdn.bootcss.com/gitalk/1.5.0/gitalk.min.css">



<script src="//cdn.jsdelivr.net/npm/js-md5@0.7.3/src/md5.min.js"></script>

<script>
  var gitalk = new Gitalk({
    clientID: '1b14852a341fed56e583',
    clientSecret: '83d7eb5ad6b5c8842e439fc6d70d7b105e273db9',
    repo: 'lizhuangs.github.io',
    owner: 'lizhuangs',
    admin: ['lizhuangs'],
    id: md5(location.pathname),
    
      language: 'zh-CN',
    
    distractionFreeMode: 'true'
  });
  gitalk.render('gitalk-container');
</script>

  


  
  <script>
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url).replace(/\/{2,}/g, '/');
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('3');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x"></i></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x"></i></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  

  

  

  

  

  

  
  
  
  <script src="/lib/needsharebutton/needsharebutton.js"></script>
  <script>
    
      pbOptions = {};
      
        pbOptions.iconStyle = "box";
      
        pbOptions.boxForm = "horizontal";
      
        pbOptions.position = "bottomCenter";
      
        pbOptions.networks = "Weibo,Wechat,Douban,QQZone,Twitter,Facebook";
      
      new needShareButton('#needsharebutton-postbottom', pbOptions);
    
    
  </script>


  

  

  

  
<script>
  $('.highlight').not('.gist .highlight').each(function(i, e) {
    var $wrap = $('<div>').addClass('highlight-wrap');
    $(e).after($wrap);
    $wrap.append($('<button>').addClass('copy-btn').append('复制').on('click', function(e) {
      var code = $(this).parent().find('.code').find('.line').map(function(i, e) {
        return $(e).text();
      }).toArray().join('\n');
      var ta = document.createElement('textarea');
      var yPosition = window.pageYOffset || document.documentElement.scrollTop;
      ta.style.top = yPosition + 'px'; // Prevent page scroll
      ta.style.position = 'absolute';
      ta.style.opacity = '0';
      ta.readOnly = true;
      ta.value = code;
      document.body.appendChild(ta);
      ta.select();
      ta.setSelectionRange(0, code.length);
      ta.readOnly = false;
      var result = document.execCommand('copy');
      
        if (result) $(this).text('复制成功');
        else $(this).text('复制失败');
      
      ta.blur(); // For iOS
      $(this).blur();
    })).on('mouseleave', function(e) {
      var $b = $(this).find('.copy-btn');
      setTimeout(function() {
        $b.text('复制');
      }, 300);
    }).append(e);
  })
</script>


  

  

  <!-- 页面点击小红心，在末尾添加，避免找不到 -->
<script type="text/javascript" src="/js/src/love.js"></script>
<!-- 崩溃 -->
<script type="text/javascript" src="/js/src/crash_cheat.js"></script>



  
  




</body>
</html>
